package com.txts.road.app.track.model.dto;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 轨迹记录表单对象
 *
 * @author baoyr
 * @since 2025-07-17 10:43
 */
@Getter
@Setter
@Schema(description = "轨迹记录表单对象")
public class TrackRecordDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "轨迹ID")
    @NotNull(message = "轨迹ID不能为空")
    private Long id;

    @Schema(description = "用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "设备ID")
    private Long deviceId;

    @Schema(description = "轨迹名称")
    @Size(max=100, message="轨迹名称长度不能超过100个字符")
    private String trackName;

    @Schema(description = "开始时间")
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @Schema(description = "总里程(公里)")
    private BigDecimal totalDistance;

    @Schema(description = "总时长(秒)")
    private Integer totalDuration;

    @Schema(description = "轨迹数据(JSON格式)")
    @Size(max=-1, message="轨迹数据(JSON格式)长度不能超过-1个字符")
    private String trackData;

   


}
